package com.kaikeba.t31.dao;

import com.kaikeba.t31.admin.po.AdminRoleMenu;
import com.kaikeba.t31.core.dao.ICrudDao;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author yumingzhi
 * @since 2021-11-15
 */
public interface AdminRoleMenuMapper extends ICrudDao<AdminRoleMenu> {

    void deleteByRole(@Param("roleId") Long roleId);

    boolean saveBatch(List<AdminRoleMenu> entityList);

    /**
     * 根据角色id查询菜单idList
     *
     * @param roleId 角色id
     * @return
     */
    List<AdminRoleMenu> getMenuByRoleId(@Param("roleId") Long roleId);

    /**
     * 根据角色id批量查询
     *
     * @param roleIds
     * @return
     */
    List<AdminRoleMenu> getMenuByRoleIdList(@Param("roleIds") List<Long> roleIds);
}
